package com.iflytek.cosmo.ocr.service;

import com.iflytek.cosmo.ocr.model.domain.State;

/**
 * 剩余
 * @author <a href=mailto:ktyi@iflytek.com>伊开堂</a>
 * @date 2020/4/21 15:08
 */
public interface RedisService {
    /**
     * 获取剩余识别页数
     * @param userId
     * @return
     */
    int getRemainRecognizePageSize(String userId);

    /**
     * 增加识别页数统计
     * @param userId
     * @param increament
     * @return 超过限制: {@link com.iflytek.cosmo.ocr.common.enums.ResultCodeEnum#RECOGNIZE_PAGE_EXCEED_LIMIT}
     */
    State increamentRecognizePageCount(String userId, int increament);
}
